h1 Log in
p This site is an example of how one can implement role based authentication in Angular applications as outlined in
    a(href="http://www.frederiknakstad.com/authentication-in-single-page-applications-with-angular-js/")  this blogpost
    | . All the code can be found in
    a(href="https://github.com/fnakstad/angular-client-side-auth")  this GitHub repository
    | . You can either register a new user, log in with one of the two predefined users...
ul
    li admin/123
    li user/123

hr
form.form-horizontal(ng-submit="login()", name="loginForm", role="form")
    .form-group
        label.control-label.col-sm-2(for="username") Username
        .col-sm-10
            input.form-control(type="text", data-ng-model="username", placeholder="Username", name="username", required, autofocus)
    .form-group
        label.control-label.col-sm-2(for="password") Password
        .col-sm-10
            input.form-control(type="password", data-ng-model="password", placeholder="Password", name="password", required)
    .form-group
        .col-sm-offset-2.col-sm-10
            .checkbox
                label(for="rememberme").checkbox
                    input(type="checkbox", data-ng-model="rememberme", name="rememberme")
                    | Remember me
    .form-group
        .col-sm-offset-2.col-sm-10
            button.btn.btn-default(type="submit", data-ng-disabled="loginForm.$invalid") Log in
hr
p ... or use one of them fancy social logins:
.btn-group
    a.btn.btn-default(href="", data-ng-click="loginOauth('facebook')")
        i.fa.fa-facebook-square
        |  Facebook
    a.btn.btn-default(href="", data-ng-click="loginOauth('twitter')")
        i.fa.fa-twitter
        |  Twitter
    a.btn.btn-default(href="", data-ng-click="loginOauth('google')")
        i.fa.fa-google-plus-square
        |  Google
    a.btn.btn-default(href="", data-ng-click="loginOauth('linkedin')")
        i.fa.fa-linkedin
        |  LinkedIn